home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
vol_100
/
161_01
/
507.c
< prev
next >
Wrap
C/C++ Source or Header
|
1985-08-28
|
349b
|
23 lines
#include "timer1.h"
long value = 1<<25 - 1;
char buf[30];
DO_IEXPR("Convert Long to ASCII") ltoa(value, buf) OD
}
/*
* convert a positive long integer into
* a sequence of ASCII digits (decimal)
*/
ltoa(value, buf)
long value;
char *buf;
{
while (value > 0) {
*buf++ = (int)(value % 10) + '0';
value /= 10;
}
}